#include "stdafx.h"
#include "CClassFactory.h"
#include "MFObjectActivate.h"
#include "FFByteStreamHandler.h"
#include "FFMediaSource.h"

HRESULT WINAPI CreateFFByteStreamHandler(IMFByteStreamHandler** ppv)
{
	if (ppv == NULL)
		return E_POINTER;
	FFByteStreamHandler* p = new FFByteStreamHandler();
	*ppv = p;
	return S_OK;
}

HRESULT WINAPI CreateFFMediaSource(IMFMediaSource** ppv)
{
	if (ppv == NULL)
		return E_POINTER;
	FFMediaSource* p = new FFMediaSource();
	*ppv = p;
	return S_OK;
}

HRESULT WINAPI CreateFFSourceMFActivate(IMFActivate** ppv)
{
	if (ppv == NULL)
		return E_POINTER;
	CClassFactory* cf = new CClassFactory();
	MFObjectActivate* p = new MFObjectActivate(cf);
	*ppv = p;
	cf->Release();
	return S_OK;
}